home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15960 < prev    next >
Encoding:
Text File  |  1996-08-05  |  867 b   |  42 lines

  1. Path: ix.netcom.com!netnews
  2. From: giuliano@ix.netcom.com(Giuliano Carlini)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Constructor member initializer list
  5. Date: 8 Apr 1996 06:47:04 GMT
  6. Organization: Netcom
  7. Message-ID: <4kacp8$89e@reader2.ix.netcom.com>
  8. References: <4jua8k$fa1$2@mhadg.production.compuserve.com>
  9. NNTP-Posting-Host: lbx-ca6-22.ix.netcom.com
  10. X-NETCOM-Date: Sun Apr 07 11:47:04 PM PDT 1996
  11.  
  12. In <4jua8k$fa1$2@mhadg.production.compuserve.com> Alan Huff
  13. // Rectangle.h
  14. class Rectangle {
  15. public:
  16.     inline Rectangle( int xArg, int yArg, int wArg, int hArg );
  17. protected:
  18.     int x;
  19.     int y;
  20.     int w;
  21.     int h;
  22. };
  23.  
  24. Rectangle (int xArg, int yArg, int wArg, int hArg)
  25. :   x( xArg ),
  26.     y( yArg ),
  27.     w( wArg ),
  28.     h( hArg )
  29. {}
  30.  
  31. // Foo.h
  32. class Foo {
  33. public:
  34.    inline Foo();
  35. protected:
  36.    RECTANGLE   fooRect;
  37. };
  38.  
  39. Foo()
  40. : fooRect( xVal, yVal, wVal, hVal )
  41. {}
  42.